/*
对公共，常用的aip接口进行统一封装处理
*/
import { post, get, del,postUmd } from '@/service/require'
// let serveU = process.env.VUE_APP_RUN == "prod"?'/api/user':'/user';
let serveV = process.env.VUE_APP_RUN == "prod"?'/api/vehicle':'/api/vehicle';
let serveU = process.env.VUE_APP_RUN == "prod"?'/api/user':'/api/user';

// ---------------电子围栏开始---------------------
// 电子围栏新增
export const bizFenceAdd = (params) => {
    return post(serveV + '/bizFence/add', params)
}
// 电子围栏详情
export const bizFenceDetail = (params) => {
    return post(serveV + '/bizFence/detail', params)
}
// 电子围栏表格查询
// export const bizFenceQueryList = (params) => {
//     return post(serveV + '/bizFence/queryList', params)
// }
// 电子围栏分页查询
export const bizFenceQueryPage = (params) => {
    return post(serveV + '/bizFence/queryPage', params)
}
// // 电子围栏 删除
export const bizFenceDelete = (params) => {
    return post(serveV + '/bizFence/delete', params)
}

// 通过车企查询电子围栏
export const bizFenceQueryByManufacturer = (params) => {
    return post(serveV + '/bizFence/queryByManufacturer', params)
}
// 电子围栏修改
export const bizFenceUpdate = (params) => {
    return post(serveV + '/bizFence/update', params)
}

// ---------------电子围栏结束---------------------

// ---------------车企开始---------------------
// 车企新增
export const bizManufacturerAdd = (params) => {
    return post(serveV + '/bizManufacturer/add', params)
}
// 车企详情
export const bizManufacturerDetail = (params) => {
    return post(serveV + '/bizManufacturer/detail', params)
}

// 车企分页查询
export const bizManufacturerQueryPage = (params) => {
    return post(serveV + '/bizManufacturer/queryPage', params)
}
// // 车企 删除
export const bizManufacturerDelete = (params) => {
    return post(serveV + '/bizManufacturer/delete', params)
}
// 车企修改
export const bizManufacturerUpdate = (params) => {
    return post(serveV + '/bizManufacturer/update', params)
}

// ---------------车企结束---------------------

// --------------车辆类型开始---------------------
// 车辆类型新增
export const bizVehicleTypeAdd = (params) => {
    return post(serveV + '/bizVehicleType/add', params)
}
// 车辆类型详情
export const bizVehicleTypeDetail = (params) => {
    return post(serveV + '/bizVehicleType/detail', params)
}

// 车辆类型分页查询
export const bizVehicleTypeQueryPage = (params) => {
    return post(serveV + '/bizVehicleType/queryPage', params)
}
// 车辆类型 删除
export const bizVehicleTypeDelete = (params) => {
    return post(serveV + '/bizVehicleType/delete', params)
}
// 车辆类型修改
export const bizVehicleTypeUpdate = (params) => {
    return post(serveV + '/bizVehicleType/update', params)
}

// ---------------车企结束---------------------

// --------------车辆 开始---------------------
// 车辆 新增/bizVehicle/add新增
export const bizVehicleAdd = (params) => {
    return post(serveV + '/bizVehicle/add', params)
}
// 车辆详情
export const bizVehicleDetail = (params) => {
    return post(serveV + '/bizVehicle/detail', params)
}

// 车辆 分页查询
export const bizVehicleQueryPage = (params) => {
    return post(serveV + '/bizVehicle/queryPage', params)
}
// 车辆 删除
export const bizVehicleDelete = (params) => {
    return post(serveV + '/bizVehicle/delete', params)
}
// 车辆修改
export const bizVehicleUpdate = (params) => {
    return post(serveV + '/bizVehicle/update', params)
}

// 车辆 获取二维码
export const bizVehicleQrcode = (id) => {
    return get(serveV + '/bizVehicle/qrcode/' + id)
}

// 车辆 下载模板
export const bizVehicleDownloadTemp = (params) => {
    return get(serveV + '/bizVehicle/downloadTemp',params,{ responseType: 'blob' })
}
// 车辆 批量下载二维码zip
export const bizVehicleZipQrcodes = (params) => {
    return get(serveV + '/bizVehicle/zipQrcodes',params,{ responseType: 'blob' })
}

// 车辆 批量导入
export const bizVehicleBatchImport = (params) => {
    return post(serveV + '/bizVehicle/import', params)
}

// ---------------车辆 结束---------------------


// --------------线路管理 开始---------------------
// 线路 新增/bizLine/add新增 
export const bizLineAdd = (params) => {
    return post(serveV + '/bizLine/add', params)
}
// 线路详情
export const bizLineDetail = (params) => {
    return post(serveV + '/bizLine/detail', params)
}

// 线路 分页查询
export const bizLineQueryPage = (params) => {
    return post(serveV + '/bizLine/queryPage', params)
}
// 线路 删除
export const bizLineDelete = (params) => {
    return post(serveV + '/bizLine/delete', params)
}
// 线路修改
export const bizLineUpdate = (params) => {
    return post(serveV + '/bizLine/update', params)
}

// ---------------线路管理 结束---------------------


// 原始事件==================================================>
//原始事件 分页查询
export const bizEventQueryPage = (params) => {
    return post(serveV + '/bizEvent/queryPage', params)
}
//原始事件 详情
export const bizEventDetail = (params) => {
    return post(serveV + '/bizEvent/detail', params)
}
//原始事件 导出
export const bizEventExportByIdList = (params) => {
    return post(serveV + '/bizEvent/exportByIdList', params,{ responseType: 'blob' })
}
//原始事件 删除
export const bizEventDelete = (params) => {
    return post(serveV + '/bizEvent/delete', params)
}
// 原始事件<==================================================

// 事件配置==================================================>
//事件配置 新增
export const bizEventConfigAdd  = (params) => {
    return post(serveV + '/bizEventConfig/add', params)
}
//事件配置 详情
export const bizEventConfigDetail = (params) => {
    return post(serveV + '/bizEventConfig/detail', params)
}
//事件配置 删除
export const bizEventConfigDelete = (params) => {
    return post(serveV + '/bizEventConfig/delete', params)
}
 //事件配置 分页查询
export const bizEventConfigQueryPage = (params) => {
    return post(serveV + '/bizEventConfig/queryPage', params)
}
 //事件配置  修改
 export const bizEventConfigUpdate = (params) => {
    return post(serveV + '/bizEventConfig/update', params)
}

// 事件配置<==================================================


// 事件日志==================================================>
//事件日志 新增 
export const bizEventLogAdd  = (params) => {
    return post(serveV + '/bizEventLog/add', params)
}
//事件日志 详情
export const bizEventLogDetail = (params) => {
    return post(serveV + '/bizEventLog/detail', params)
}
//事件日志 删除
export const bizEventLogDelete = (params) => {
    return post(serveV + '/bizEventLog/delete', params)
}
 //事件日志 分页查询
export const bizEventLogQueryPage = (params) => {
    return post(serveV + '/bizEventLog/queryPage', params)
}
 //事件日志  修改
 export const bizEventLogUpdate = (params) => {
    return post(serveV + '/bizEventLog/update', params)
}
//事件日志 导出
export const bizEventLogExportByIdList = (params) => {
    return post(serveV + '/bizEventLog/exportByIdList', params,{ responseType: 'blob' })
}

// 事件配置<==================================================

// 系统日志==================================================>
//系统日志 分页查询
export const sysLogQueryPage = (params) => {
    return post(serveU + '/sysLog/queryPage', params)
}
//系统日志 导出     
export const sysLogExportByIdList = (params) => {
    return post(serveU + '/sysLog/exportByIdList', params,{ responseType: 'blob' })
}

// 系统日志<==================================================



// 首页大屏接口==================================================>
// 首页大屏接口 企业数据统计
// export const manufacturerReportFindTotalCount = (params) => {
//     return post(serveV + '/manufacturerReport/findTotalCount', params)
// }

// // 首页大屏接口 不同类型的事件数量
// export const queryGroupCodeCount = (params) => {
//     return post(serveV + '/eventReport/queryGroupCodeCount', params)
// }
// // 首页大屏接口   不同类型的事件数量
// export const queryGroupOperatorType = (params) => {
//     return post(serveV + '/eventReport/queryGroupOperatorType', params)
// }

// // 首页大屏接口   不同类型的车辆数量
// export const findGroupCount = (params) => {
//     return post(serveV + '/vehicleReport/findGroupCount', params)
// }
// // 首页大屏接口   不同类型的车辆数量
// export const queryGroupManufacturerCount = (params) => {
//     return post(serveV + '/eventReport/queryGroupManufacturerCount', params)
// }
// // 首页大屏接口   不同类型的车辆数量
// export const queryGroupTypeCount = (params) => {
//     return post(serveV + '/eventReport/queryGroupTypeCount', params)
// }

// 首页大屏接口   不同类型的车辆数量 左侧1，车辆概况分布
export const findGroupCount = (params) => {
    return post(serveV + '/bizReport/findGroupCount', params)
}

// 首页大屏接口   查询总数量
export const findTotalCount = (params) => {
    return post(serveV + '/bizReport/findTotalCount', params)
}

// 首页大屏接口   右边安全里程趋势
export const queryDistanceYear = (params) => {
    return post(serveV + '/bizReport/queryDistanceYear', params)
}

// 首页大屏接口   左侧3，企业入驻排行
export const queryGroupManufacturerCount = (params) => {
    return post(serveV + '/bizReport/queryGroupManufacturerCount', params)
}

// 首页大屏接口   右边实时事件分析-按运营企业
export const queryGroupOperatorType = (params) => {
    return post(serveV + '/bizReport/queryGroupOperatorType', params)
}

// 首页大屏接口   左侧2，车型分布
export const queryGroupTypeCount = (params) => {
    return post(serveV + '/bizReport/queryGroupTypeCount', params)
}

// 首页大屏接口   右边实时事件分析-按类型的数量
export const queryLevelGroupCount = (params) => {
    return post(serveV + '/bizReport/queryLevelGroupCount', params)
}

// 首页大屏接口   右边动态线路评价
export const queryLineTypeCount = (params) => {
    return post(serveV + '/bizReport/queryLineTypeCount', params)
}


// 首页大屏接口<==================================================

//车企工作台-   开始

// 电子围栏 分页查询
export const backFenceQueryPage = (params) => {
    return post(serveV + '/backFence/queryPage', params)
}
// 电子线路 分页查询
export const backLineQueryPage = (params) => {
    return post(serveV + '/backLine/queryPage', params)
}
// 车辆 详情
export const backVehicleDetail = (params) => {
    return post(serveV + '/backVehicle/detail', params)
}


// 车辆 接入车辆
export const backVehicleOptCount = (params) => {
    return post(serveV + '/backVehicle/optCount', params)
}
// 车辆 分页查询
export const backVehicleQueryPage = (params) => {
    return post(serveV + '/backVehicle/queryPage', params)
}
// 车企工作台  车企详情

export const backManufacturerDetail = (params) => {
    return post(serveV + '/backManufacturer/detail', params)
}

//车企工作台-   结束










